﻿<UserControl x:Class="News.Controls.ModernFeedItem"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:Properties="clr-namespace:News.Properties" mc:Ignorable="d" RenderTransformOrigin="0.5,0"
             d:DesignHeight="100" d:DesignWidth="300" Margin="0,5,5,0" FontFamily="pack://application:,,,/Fonts/#Droid Sans" Opacity="0" MouseLeftButtonUp="UserControlMouseLeftButtonUp">
    <UserControl.RenderTransform>
        <ScaleTransform x:Name="ScaleTransform" ScaleX="1.2" ScaleY="{Binding ElementName=ScaleTransform, Path=ScaleX}"/>
    </UserControl.RenderTransform>
    <UserControl.Triggers>
        <EventTrigger RoutedEvent="UserControl.Loaded">
            <BeginStoryboard>
                <Storyboard>
                    <DoubleAnimation x:Name="ScaleAnim" Storyboard.TargetProperty="(RenderTransform).ScaleX" From="1.2" To="1" Duration="0:0:0.3" DecelerationRatio="0.3"/>
                    <DoubleAnimation x:Name="OpacityAnim" Storyboard.TargetProperty="Opacity" From="0" To="1" Duration="0:0:0.3"/>
                </Storyboard>
            </BeginStoryboard>
        </EventTrigger>
    </UserControl.Triggers>
    <StackPanel>
        <TextBlock Margin="10,0,10,0" Name="TitleBox" Foreground="White" FontWeight="Bold" TextOptions.TextFormattingMode="Display" FontSize="15" TextWrapping="Wrap" TextTrimming="CharacterEllipsis"  MaxHeight="50" Cursor="Hand"/>
        <DockPanel Name="ContentPanel" Margin="10,7,10,0" MaxHeight="43">
            <Image Name="Image" MaxWidth="43" DockPanel.Dock="Left" Margin="0,0,5,0" Visibility="Collapsed" Stretch="UniformToFill" RenderOptions.BitmapScalingMode="HighQuality"/>
            <TextBlock Margin="0,-3,0,-3" Name="DescriptionBox" TextWrapping="Wrap" TextTrimming="CharacterEllipsis" Foreground="White" FontSize="14" TextOptions.TextFormattingMode="Display"/>
        </DockPanel>
        <TextBlock Name="FromBox" Margin="10,8,10,0" Foreground="White" TextOptions.TextFormattingMode="Display" FontSize="12" TextTrimming="CharacterEllipsis" FontFamily="pack://application:,,,/Fonts/#Droid Serif" FontStyle="Italic">
            <Run Name="DateBox"/>
            <Run Text="{x:Static Properties:Resources.From}"/>
            <Run Name="ChannelBox"/>
        </TextBlock>
        <Rectangle Height="1" Fill="#444444" Margin="0,5,0,0" Opacity="0.7"/>
        <Rectangle Height="1" Fill="#b8b8b8" Opacity="0.7"/>
    </StackPanel>
</UserControl>
